package bb.lanxing.lib.devices.sprint;

import android.content.Context;
import bb.lanxing.lib.devices.api.SmartDevice;
import bb.lanxing.lib.devices.core.exception.AbortedException;
import bb.lanxing.lib.devices.core.exception.TimeoutException;
import java.io.File;

public class XZSprintXossDevice extends XossDevice {
    public XZSprintXossDevice(Context context, SmartDevice smartDevice) {
        super(context, smartDevice);
    }

    public XZSprintXossDevice(Context context, SmartDevice smartDevice, String str) {
        super(context, smartDevice, str);
    }

    @Override
    public void onServicesDiscovered() {
        super.onServicesDiscovered();
        readBattery();
        readFirmwareVersion();
    }

    @Override
    public void handleExceptionForSender(Command command, Throwable th) {
        if ((th instanceof TimeoutException) || (th instanceof AbortedException)) {
            sendCmd(Commands.create(31, null));
        }
        super.handleExceptionForSender(command, th);
    }

    @Override
    public void _sendFile(File file) {
        ensureIdleStatus();
        super._sendFile(file);
    }

    @Override
    public void _getFile(String str) {
        ensureIdleStatus();
        super._getFile(str);
    }

    @Override
    public void _delete(String str) {
        ensureIdleStatus();
        super._delete(str);
    }
}
